package musictube.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Application implements EntryPoint {

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		// create the main vertical panel
		VerticalPanel panel = new VerticalPanel();
		RootPanel.get().add(panel);

		// create the testing database
		IDatabase database = new HardcodedDatabase();

		// create the song player
		final HiddenIFrameSongPlayer songPlayer = new HiddenIFrameSongPlayer();
		panel.add(songPlayer);

		// create the song selector
		WebSongSelector songSelector = new WebSongSelector(database, songPlayer);
		panel.add(songSelector);
	}
}
